#include <iostream>
using namespace std;
#include <string>
int main(){
	int one;
	int two;
	int three;
	int four;
	int five;
	string name;
	        cout << "Hello and welcome to the grade averager.  First enter your first name so we can stalk you." << endl;
		cin >> name;
		    cout << "Now enter your Spanish grade" << endl;
	    cin >> one;
		    cout << "Now enter your Social Studies grade" << endl;
		cin >> two;
		    cout << "Now enter your Lunch grade" << endl;
		cin >> three;
			cout << "Now enter your English grade." << endl;
		cin >> four;
	     	cout << "I assure you this program is not broken...enter your Mathematics grade." << endl;
		cin >> five;
		
		int array [5];
		array [0] = one;
		array [1] = two;
		array [2] = three;
		array [3] = four;
		array [4] = five;
		int final =((one + two + three + four + five)/5);
		cout << "Your average, " << (name) << ", is: " << final << endl;
		if(final < 0 || final > 100) {
			cout << "Lets try again.  Enter your actual grades this time." << endl;
			main();
		}
		if (final > -1 && final < 65) {
			cout << "You FAILURE you got an F :(. Try again" << endl;
			main();
		}
		else if (final > 64 && final < 80){
			cout << "What a horrible average LOL you couldn't even get a B. Try again" << endl;
		main();
		}
		else if (final > 79 && final < 90) {
			cout << "LOL your not even an asian you IDIOT...couldn't even get an A. Try again" << endl;
			main();
		}
		else if (final >89 && final < 101){
			cout << "You got an A!  If your asian say 'im_asian'(because you probably are)" << endl;
		
			string asian;
			cin >> asian;
			if (asian == "im_asian"){
				cout << "No you aren't. Try again" << endl;
				main();
			}
			else {
				cout << "So im assuming your not asian...or you dont know how to follow simple commands" << endl;
				cout << "If you not asian then you obviously cheat in school" << endl;
				cout << " If you are and you aren't smart enough to follow simple commands then you have brought shame to your famary" << endl;
			}
		}
	system ("pause");
	return 0;
};